package com.migu.contacts.util;

import java.util.List;

public class ImportanceUtil {
    public static String getName(int id) {
        return list.get(id - 1);
    }

    // 1=低 2=中 3=高
    static List<String> list = List.of("低", "中", "高");

    public static int getId(String groupName) {
        for (int i = 0; i < list.size(); i++) {
            if (list.get(i).equals(groupName)) {
                return i + 1;
            }
        }
        return -1;
    }
}
